<template>
  <el-header height='100px' class="hidden-sm-and-down ">
      <el-row hidden-sm-and-down   type="flex" justify="space-between" align="middle" style=" width: 80%;margin:auto"> 
          <div  >
              <img src="../assets/icon-logo.png" style="height:50px"> 
          </div>
          <div  >
              <el-menu :default-active="seleIndex" class="el-menu-demo" mode="horizontal" @select="navsel">
                  <el-menu-item index="1">首页</el-menu-item> 
                  <el-menu-item index="2">APP下载</el-menu-item>
              </el-menu> 
          </div>  
      </el-row>  
  </el-header>
</template>

<script>
  export default {
    name: 'headnav',
    data() {
      return {
        // active: '1', 
      };
    },
    props:['seleIndex'],    
    methods: {
      navsel(key, keyPath) {  
          switch(key){
              case "1":window.location.href = '/#/';break;
              case "2":window.location.href = '/#/app';break;
          }
      }
    },
  }
</script>
<style>
.el-header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  align-items: center;
  display: flex;
  padding: 0;
  position: fixed;
  width: 100%;
 z-index: 50;
}
.el-menu--horizontal {
  border-bottom: 0px;
}
.el-menu--horizontal > .el-menu-item {
  height: 30px;
  line-height: 30px;
  font-size: 16px;
  font-weight: 500;
}
</style>
